package com.jml.callback;

import com.jml.service.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;

/**
 * ApplicationRunner接口，在springboot启动完事后会进行回调。
 */
public class StartCallbackImpl implements ApplicationRunner {

    @Autowired
    private RegisterService registerService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        registerService.register();
    }
}
